﻿using System;
using System.Collections.Generic;
using System.Text;

using Obsidian.Edm;

namespace Obsidian.Runtime
{
    public class LogInfo : OModel
    {

        private LongField code;
        private DateTimeField time;
        private StringField requestString;
        private StringField sqlText;
        private StringField message;
        private StringField stackTrace;

        public LogInfo(string alias)
        {
            base.InitModel(alias, "Logs", new IModelField[]{
                code = new LongField(this, "Code", "code"),
                time = new DateTimeField(this, "Time", "time"),
                requestString = new StringField(this, "RequestString", "reqStr"),
                sqlText = new StringField(this, "SqlText", "sqlText"),
                message = new StringField(this, "Message", "msg"),
                stackTrace = new StringField(this, "StackTrace", "stackTrace")
            });
        }

        public LongField Code { get { return code; } }
        public DateTimeField Time { get { return time; } }
        public StringField RequestString { get { return requestString; } }
        public StringField SqlText { get { return sqlText; } }
        public StringField Message { get { return message; } }
        public StringField StackTrace { get { return stackTrace; } }

    }
}
